package cloudgamesaumysql

import (
	"github.com/shopspring/decimal"
	"gorm.io/gorm"
	"time"
)

/*
  @author liubogeng
  @date   2024/8/5 12:47
*/

// CGGameAURechargeLimitConfigurationRecordDirectPurchase 直购限额配置记录表
type CGGameAURechargeLimitConfigurationRecordDirectPurchase struct {
	ID                int64           `json:"id" gorm:"column:id;type:bigint;primaryKey;autoIncrement;comment:ID"`
	InitialQuotaOfDay decimal.Decimal `json:"initial_quota_of_day" gorm:"column:initial_quota_of_day;type:decimal(12,2);not null;default:0.00;comment:当日初始额度（元）"`
	CurrentQuota      decimal.Decimal `json:"current_quota" gorm:"column:current_quota;type:decimal(12,2);not null;default:0.00;comment:现额度（元）"`
	RechargedAmount   decimal.Decimal `json:"recharged_amount" gorm:"column:recharged_amount;type:decimal(12,2);not null;default:0.00;comment:已充值金额（元）"`
	NowQuota          decimal.Decimal `json:"now_quota" gorm:"column:now_quota;type:decimal(12,2);not null;default:0.00;comment:当前额度（元）"`
	ModifyPersonnel   string          `json:"modify_personnel" gorm:"column:modify_personnel;type:varchar(20);not null;default:'';comment:修改人员"`
	EffectiveMethod   int             `json:"effective_method" gorm:"column:effective_method;type:tinyint;default:0;not null;comment:生效方式；0自动刷新 1上调 2下调"`
	EffectiveTime     time.Time       `json:"effective_time" gorm:"column:effective_time;type:datetime;default:null;comment:生效时间"`
	StartTime         time.Time       `json:"start_time" gorm:"column:start_time;type:datetime;default:null;comment:开始时间"`
	StopTime          time.Time       `json:"stop_time" gorm:"column:stop_time;type:datetime;default:null;comment:结束时间"`
	CreatedAt         time.Time       `json:"created_at" gorm:"column:created_at;type:datetime;comment:该条记录创建时间"`
	UpdatedAt         time.Time       `json:"updated_at" gorm:"column:updated_at;type:datetime;comment:该条记录修改时间"`
	DeletedAt         gorm.DeletedAt  `json:"-" gorm:"index;type:datetime;comment:该条记录删除时间"`
}

func (CGGameAURechargeLimitConfigurationRecordDirectPurchase) TableName() string {
	return "cg_game_au_recharge_limit_configuration_record_direct_purchase"
}
